# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
# NOTE: ensure compatibility with py3-flake8! (#11378)
pkgname=py3-pyflakes
_pkgname=${pkgname#py3-}
pkgver=2.2.0
pkgrel=0
pkgdesc="A passive checker of Python programs"
url="https://github.com/pyflakes/pyflakes"
arch="noarch"
license="MIT"
depends="python3 py3-setuptools"
source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

replaces="py-pyflakes" # Backwards compatibility
provides="py-pyflakes=$pkgver-r$pkgrel" # Backwards compatibility

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	mkdir -p "$pkgdir"/usr/bin
	ln -s pyflakes "$pkgdir"/usr/bin/pyflakes-3

	python3 setup.py --quiet install --prefix=/usr --root="$pkgdir"
}

sha512sums="6a411efef261874c216b71bcb095412448a8cbeefdf7fa5577d4f4edd48a4a740a4433665e87e5dda2c08fd9ee3bfb7f134f56c7523e1303243edfa92b0ccb35  pyflakes-2.2.0.tar.gz"
